package com.tz.service.impl;


import com.tz.dao.IUserDao;
import com.tz.entity.User;
import com.tz.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created by heziqian on 2016/10/21.
 */
@Component
public class UserServiceImpl implements IUserService {

	@Autowired
	private IUserDao userDao;

	@Override
	public User login(String username, String password) {
		return userDao.selectUser(username, password);
	}

	@Override
	public void register(User user) {
		userDao.insterUser(user);
	}
}
